package edu.pku.sei.act.main.action;

import edu.pku.sei.act.ctrl.editpart.ArchiModelEditPartFactory;
import edu.pku.sei.act.main.palette.ArchiModelerPackagePaletteFactory;
import edu.pku.sei.act.main.palette.ArchiModelerPaletteFactory;
import edu.pku.sei.act.main.palette.ArchiModelerTaskPaletteFactory;
import edu.pku.sei.gmp.editor.GMPEditorInput;
import edu.pku.sei.gmp.editor.action.AbstractOpenDiagramAction;
import edu.pku.sei.gmp.model.common.GMPModel;

public class ArchiModelerOpenTaskDiagramAction extends AbstractOpenDiagramAction{
	
	private String name;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public ArchiModelerOpenTaskDiagramAction() {
		super();
	}
	
	public ArchiModelerOpenTaskDiagramAction(String name)
	{
		super();
		setName(name);
	}
	
	
	public ArchiModelerOpenTaskDiagramAction(Object treeObject) {
		super(treeObject);
	}
	
	
	
	@Override
	public void configureEditorInput(GMPEditorInput input) {
		GMPModel model = input.getDiagram().getModel();
		input.setEditPartFactory(new ArchiModelEditPartFactory());
		input.setPaletteFactory(new ArchiModelerTaskPaletteFactory(model));
	}

}
